package uestc.lj.gulishop.product.feign.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import uestc.lj.common.exception.ErrorCode;
import uestc.lj.common.utils.R;
import uestc.lj.gulishop.product.feign.SeckillFeignService;

/**
 * @Author:Crazlee
 * @Date:2021/6/25
 */
@Component
@Slf4j
public class SeckillFeignServiceFallback implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.error("远程秒杀服务器繁忙！+getSkuSeckillInfo()");
        return R.error(ErrorCode.SYSTEM_BUZY_NOW.getCode(), ErrorCode.SYSTEM_BUZY_NOW.getMessage());
    }
}
